package cn.dw.mm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.dw.mm.domain.Department;
import cn.dw.mm.mapper.DepartmentMapper;
import cn.dw.mm.service.DepartmentService;

@Service
public class DepartmentServiceImpl implements DepartmentService {
	
	@Autowired
	private DepartmentMapper departmentMapper;

	@Override
	public List<Department> selectByLevel(String level) {
		return departmentMapper.selectByLevel(level);
	}

	@Override
	public Department selectById(Integer id) {
		return departmentMapper.selectById(id);
	}

	@Override
	public int updateById(Department department) {
		return departmentMapper.updateById(department);
	}

	@Override
	public int deleteById(Integer id) {
		return departmentMapper.deleteById(id);
	}

	@Override
	public int insert(Department department) {
		return departmentMapper.insert(department);
	}
}
